<%@page import="com.mmy.domain.sys.TSysUser"%>
<%@page import="com.mmy.domain.bidtender.TBidTender"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
 <%
 	TSysUser tSysUser = (TSysUser)session.getAttribute("tSysUser");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/include1.jsp"></jsp:include>
		
		<script src="js/date.js"></script>
	</head>
	<body>
		<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/FrontHeader.jsp"></jsp:include>
		<div id="index-back">
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<main class="at-padding-large-bottom">
			<article>
				<header class="frontbg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
					<div class="page-header container">
						<div class="row">
				<div class="span-12 col">
					<h2>
					<input type="hidden" name="strInviteID" value="${dbBidTender.getInviteID() }"/>
						<label>修改${dbBidTender.getInviteName()}的投标信息</label>
						</h2>
				</div>

			</div>
					</div>
				</header>
				<section class="container">

					<div class="information" >
				<form class="info-form" >
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>修改投标信息
						</h4>
					<div class="input-container">
					<table class="info-table">
						<tr>
					<th><label for="TenderInviteName">招标名称</label></th>
					<td colspan="5">
					<input type="hidden" id="TenderID" name="TenderID" value="${dbBidTender.getTenderID() }" readonly="readonly"/>
						<input type="hidden" id="TenderInviteID" name="InviteID" value="${dbBidTender.getInviteID() }" readonly="readonly"/>
						<input type="text" id="TenderInviteName" name="InviteName" value="${dbBidTender.getInviteName() }" readonly="readonly"/>
					</td>
					</tr>
					<tr>
					<th><label for="TenderBudget">预算金额</label></th>
					<td colspan="5">
				<input type="number" step="0.01" id="TenderBudget" name="Budget" value="${dbBidTender.getBudget() }" maxlength="18"  oninput="if(value>${dbConstParameter.getValue() })value=${dbConstParameter.getValue() };if(value.length>18)value=value.slice(0,18);if(value<0)value=0" required="required"></input> <span class="mustWrite">*</span>
					</td>
					
					
				</tr>
				<tr>
					<th><label for="TenderOutDate">出行日期</label></th>
					<td colspan="2">
						 <!-- <input type="datetime-local" id="InviteOutDate" name="outDate" required/>--<input type="datetime-local" name="backDate"  required/><span class="mustWrite">*</span> -->
					<input type="text" id="TenderOutDate" onclick="SetDate(this,'yyyy-MM-dd hh:mm:ss')" placeholder="请选择日期" name="strOutDate" value="${dbBidTender.getOutDate() }"  required="required" /><span class="mustWrite">*</span>
					</td>
					<th><label for="TenderBackDate">返程日期</label></th>
					<td colspan="2">
						 <!-- <input type="datetime-local" id="InviteOutDate" name="outDate" required/>--<input type="datetime-local" name="backDate"  required/><span class="mustWrite">*</span> -->
					<input type="text" onclick="SetDate(this,'yyyy-MM-dd hh:mm:ss')" placeholder="请选择日期" id="TenderBackDate" name="strBackDate" value="${dbBidTender.getBackDate() }" required="required" /><span class="mustWrite">*</span>
					</td>
					
					
				</tr>
				<tr>
					<th><label for="TenderOwn">自费项目</label></th>
						<td colspan="5">
						<textarea id="TenderOwn" name="Own" maxlength="512" required="required">${dbBidTender.getOwn() }</textarea><span class="mustWrite">*</span>
					</td>
					
				</tr>
				<tr>
					<th><label for="TenderTips">温馨提示</label></th>
						<td colspan="5">
						<textarea id="TenderTips" name="Tips" maxlength="512" required="required">${dbBidTender.getTips() }</textarea><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th><label for="TenderStandard">接待标准</label></th>
						<td colspan="5">
						<textarea id="TenderStandard" name="Standard" maxlength="512" maxlength="512" required="required"> ${dbBidTender.getStandard() }</textarea><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th><label for="TenderExplain">接待说明</label></th>
						<td colspan="5">
						<textarea id="TenderExplain" name="Explain" maxlength="512" required="required">${dbBidTender.getExplain() }</textarea><span class="mustWrite">*</span>
					</td>
				</tr>
				<tr>
					<th><label for="TenderMemo">备注</label></th>
						<td colspan="5">
						<textarea id="TenderMemo" name="Memo" maxlength="256">${dbBidTender.getMemo() }</textarea>
					</td>
				</tr>
						</table>
			</div>
			<h4 class="info-h4">
				<i class="fa fa-caret-right" aria-hidden="true" ></i>修改投标行程信息
			</h4>
					<div class="input-container">
					
					<table id="tripTable" class="info-table">
<tbody>
		<tr>
		<td colspan="8">详情</td>
		<td>操作</td>
		</tr>
		
		</tbody>
  <c:forEach items="${lstBidTrip}" var="lstBidTrip" varStatus="status" begin="0" >
<tbody id="tbody${status.index }">
<tr >
<th rowspan="11" colspan="2"><label for="TripDay${status.index }">第</label>
<input type="number" id="TripDay${status.index }" class="daywidth" name="Day" size="2"  value="${lstBidTrip.getDay() }" maxlength="2" required="required"/>
<label for="TripDay${status.index }">天</label><span class="mustWrite">*</span></th>
<th ><label for="TripAddress${status.index }">地点</label></th>
<td ><input type="text" id="TripAddress${status.index }" name="Address" value="${lstBidTrip.getAddress() }" maxlength="128" required="required"/><span class="mustWrite">*</span></td>
<th ><label for="TripStay${status.index }">住宿</label></th>
<td ><input type="text" id="TripStay${status.index }" name="Stay" value="${lstBidTrip.getStay() }" maxlength="128" required="required"/><span class="mustWrite">*</span></td>
<th ><label for="TripMeal${status.index }">含餐</label></th>
<td ><input type="text" id="TripMeal${status.index }" name="Meal" value="${lstBidTrip.getMeal() }" maxlength="64" required="required"/><span class="mustWrite">*</span></td>
<td rowspan="11"><input type="button"  class="btn" onclick="removeTr(${status.index })" value="删除"></td> 
</tr>
<tr>
<th ><label for="TripTrip${status.index }">具体行程</label></th>
<td colspan="5"><textarea id="TripTrip${status.index }" name="Trip" maxlength="512" required="required"> ${lstBidTrip.getTrip() }</textarea><span class="mustWrite">*</span></td>
</tr>
<tr>
<th rowspan="4"><label for="TripHotel1${status.index }">酒店照片</label></th>
<td><label for="TripHotel1${status.index }">图片1:</label></td>
<td colspan="4" ><input type="file" id="TripHotel1${status.index }" name="HotelPath1" value="${lstBidTrip.getHotelPath1() }"/></td>
</tr>
<tr>
<td><label for="TripHotel2${status.index }">图片2:</label></td>
<td colspan="4" ><input type="file" id="TripHotel2${status.index }" name="HotelPath2"  value="${lstBidTrip.getHotelPath2() }"/></td>
</tr>
<tr>
<td><label for="TripHotel3${status.index }">图片3:</label></td>
<td colspan="4" ><input type="file" id="TripHotel3${status.index }" name="HotelPath3"  value="${lstBidTrip.getHotelPath3() }"/></td>
</tr>
<tr>
<td><label for="TripHotel4${status.index }">图片4:</label></td>
<td colspan="4" ><input type="file" id="TripHotel4${status.index }" name="HotelPath4"  value="${lstBidTrip.getHotelPath4() }"/></td>
</tr>
<tr>
<th rowspan="4"><label for="TripScenic1${status.index }">景点照片</label></th>
<td><label for="TripScenic1${status.index }">图片1:</label></td>
<td colspan="4" ><input type="file" id="TripScenic1${status.index }" name="ScenicPath1"  value="${lstBidTrip.getScenicPath1() }"/></td>
</tr>
<tr>
<td><label for="TripScenic2${status.index }">图片2:</label></td>
<td colspan="4" ><input type="file" id="TripScenic2${status.index }" name="ScenicPath2"  value="${lstBidTrip.getScenicPath2() }"/></td>
</tr>
<tr>
<td><label for="TripScenic3${status.index }">图片3:</label></td>
<td colspan="4" ><input type="file" id="TripScenic3${status.index }" name="ScenicPath3"  value="${lstBidTrip.getScenicPath3() }"/></td>
</tr>
<tr>
<td><label for="TripScenic4${status.index }">图片4:</label></td>
<td colspan="4" ><input type="file" id="TripScenic4${status.index }" name="ScenicPath4"  value="${lstBidTrip.getScenicPath4() }"/></td>
</tr>
<tr>
<td><label for="TripMemo${status.index }">备注:</label></td>
<td colspan="5" ><textarea id="TripMemo${status.index }" name="Memo" maxlength="256">${lstBidTrip.getMemo() }</textarea></td>
</tr>
</tbody>

	</c:forEach>			
			</table>
			<input type="button" id="btn_tripaddtr" class="btn" value="增行" onClick="addTables()" >
			
			</div>
<h4 class="info-h4">
			<i class="fa fa-caret-right" aria-hidden="true" ></i>修改投标明细
		</h4>
					<div class="input-container">
				
					<table id="detailedTable" class="info-table">
<tbody>
		<tr>
		<td colspan="6">详情 </td>
		<td>操作</td>
		</tr>
		
		</tbody>
  <c:forEach items="${lstBidDetailed}" var="lstBidDetailed" varStatus="status" begin="0" >

<tbody id="tbody${status.index }">
<tr>
<th rowspan="5"><label for="DetailedName${status.index }">明细名称</label></th>
<td rowspan="5"><input type="text" id="DetailedName${status.index }" name="DetailedName" size="2" maxlength="64" value="${lstBidDetailed.getDetailedName() }" required="required"/><span class="mustWrite">*</span></td>
<th ><label for="DetailedBudget${status.index }">报价</label></th>
<td colspan="3"><input type="number" id="DetailedBudget${status.index }" name="Budget" step="0.01" value="${lstBidDetailed.getBudget() }" maxlength="18"  oninput="if(value>999999999999999)value=999999999999999.00;if(value.length>18)value=value.slice(0,18);if(value<0)value=0" required="required"/><span class="mustWrite">*</span></td>
<td rowspan="5"><input type="button"  class="btn" onclick="removeDetailedTr(${status.index })" value="删除"></td> 
</tr>
<tr>
<th ><label for="DetailedHotel1${status.index }">图片1</label></th>
<th ><label for="DetailedHotel2${status.index }">图片2</label></th>
<th ><label for="DetailedHotel3${status.index }">图片3</label></th>
<th ><label for="DetailedHotel4${status.index }">图片4</label></th>
</tr>
<tr>
<td ><input type="file" id="DetailedHotel1${status.index }" name="HotelPath1" value="${lstBidDetailed.getHotelPath1() }" /></td>
<td ><input type="file" id="DetailedHotel2${status.index }" name="HotelPath2" value="${lstBidDetailed.getHotelPath2() }"/></td>
<td ><input type="file" id="DetailedHotel3${status.index }" name="HotelPath3" value="${lstBidDetailed.getHotelPath3() }"/></td>
<td ><input type="file" id="DetailedHotel4${status.index }" name="HotelPath4" value="${lstBidDetailed.getHotelPath4() }"/></td>
</tr>
<tr>
<th ><label for="DetailedContent${status.index }">内容</label></th>
<td colspan="3"><textarea id="DetailedContent${status.index }" name="Content" maxlength="1024" required="required">${lstBidDetailed.getContent() }</textarea><span class="mustWrite">*</span></td>
</tr>
<tr>
<th ><label for="DetailedMemo${status.index }">备注</label></th>
<td colspan="3"><textarea id="DetailedMemo${status.index }" name="Memo" maxlength="256">${lstBidDetailed.getMemo() }</textarea></td>
</tr>
</tbody>

	</c:forEach>			
			</table>
				<input type="button" id="btn_detailedaddtr" class="btn" value="增行" onClick="addDetailedTable()" >
			
			</div>
				<center>
				<input type="submit" class="btn" value="保存" onclick="saveUpdateBidTender()"/>
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
			</center> 
			</form>
			</div>
			</section>
			</article>
			</main>
			<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main End -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	<!-- /st-container -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Script Embed Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
		

</body>
</html>